package com.example.springloud.client;

import com.example.springloud.fallback.HystrixFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author chensixiang chensixiang1234@gmail.com
 */
@FeignClient(value = "CLOUD-PROVIDER-HYSTRIX-PAYMENT", fallback = HystrixFallBack.class)
public interface HystrixClient {

    @GetMapping("/payment/ok/{id}")
    String paymentInfo_OK(@PathVariable("id") Integer id);

    @GetMapping("/payment/timeout/{id}")
    String paymentInfo_Timeout(@PathVariable("id") Integer id);
}
